package gdonly.top.signin.business;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import gdonly.top.signin.R;

/**
 * Created by zhuzhuxia on 2017/5/14.
 */
public class QuerySignInfoActivity extends AppCompatActivity{

    private Button queryByStuBtn, queryByCourseBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_querysigninfo);

        initViews();
    }

    private View.OnClickListener listener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch(v.getId()){
                case R.id.querybycourse_btn:
                    Intent intent = new Intent(QuerySignInfoActivity.this, QueryByCourseActivity.class);
                    startActivity(intent);
                    break;
                case R.id.querybystu_btn:
                    intent = new Intent(QuerySignInfoActivity.this, QueryByStuActivity.class);
                    startActivity(intent);
                    break;
            }
        }
    };
    private void initViews(){
        queryByCourseBtn = (Button) findViewById(R.id.querybycourse_btn);
        queryByStuBtn = (Button) findViewById(R.id.querybystu_btn);

        queryByCourseBtn.setOnClickListener(listener);
        queryByStuBtn.setOnClickListener(listener);
    }
}
